<table class="layui-table">
    <thead>
    <tr>
        <td>广告编号</td>
        <td>广告标题</td>
        <td>发布人</td>
        <td>更新时间</td>
        <td>广告状态</td>
        <td>管理操作</td>
    </tr>
    </thead>
    {present name='ads'}
    {volist name='ads' id='ad'}
    <tr>
        <td>{$ad.id}</td>
        <td>{$ad.name}</td>
        <td>{$ad.member.username}</td>
        <td>{$ad.update_time}</td>
        <td class="layui-form">
            <input type="checkbox" lay-skin="switch" lay-filter="status" lay-text="ON|OFF" data-id="{$ad.id}"  value="1" {eq name="ad.status" value="1"} checked{/eq}>
        </td>
        <td class="textalign">
            <a href="javascript:ad.edit('{$ad.id}');" class="layui-btn layui-btn-small btn-success">
                编辑
            </a>
            <!--<a href="javascript:ad.delete('{$ad.id}');"  class="layui-btn layui-btn-small btn-danger">
                删除
            </a>-->
        </td>
    </tr>
    {/volist}
    {/present}
</table>
<div class="fr mt20">
    总记录数：{$ads->total()} {$ads->render()}
</div>
